﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AddEdit.ascx.cs" Inherits="Admin_Product_AddEdit" %>
<%@ Register Assembly="GroupDropDownList" Namespace="GroupDropDownList" TagPrefix="cc1" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:HiddenField runat="server" ID ="hidLang" Value="vi-VN" />
<asp:HiddenField runat="server" ID = "hidId" />
<asp:HiddenField runat="server" ID = "hidInfoId" />
<h2>
    Quản lý sản phẩm
</h2>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" CssClass="error" />
<table width="100%">
    <tr>
        <td width="120px" class="req">
            Tên sản phẩm
        </td>
        <td>
            <asp:TextBox ID="txtProductName" runat="server" Width="450px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Nhập tên sản phẩm"
                ControlToValidate="txtProductName" Display="Dynamic" >*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td class="req">
            Mã sản phẩm
        </td>
        <td>
            <asp:TextBox ID="txtCode" runat="server" Width="194px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Nhập mã sản phẩm"
                ControlToValidate="txtCode" Display="Dynamic">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td class="req">
            Danh mục
        </td>
        <td>
            <cc1:GroupDropDownList ID="ddlCategory" runat="server" Width="200px" AppendDataBoundItems="true">
                <asp:ListItem Value="">------------- Chọn -------------</asp:ListItem>
            </cc1:GroupDropDownList>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Chọn danh mục"
                ControlToValidate="ddlCategory" Display="Dynamic">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td class="req">
            Giá
        </td>
        <td>
            <asp:TextBox ID="txtPrice" runat="server" Width="194px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Nhập giá sản phẩm"
                ControlToValidate="txtPrice" Display="Dynamic">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr valign="top">
        <td>
            Hình ảnh
        </td>
        <td>
            <ul class="upload">
                <li>
                    <asp:FileUpload ID="filePhoto" runat="server" /></li>
                <li>
                    <asp:Image ID="imgPhoto" runat="server" Height="80px" Width="80px" Visible="false" /></li>
            </ul>
        </td>
    </tr>
    <tr valign="top">
        <td>
            Tóm tắt
        </td>
        <td>
            <asp:TextBox ID="txtInfor" runat="server" TextMode="MultiLine" Width="100%" Height="90px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            Nội dung
        </td>
        <td>
            <FCKeditorV2:FCKeditor ID="txtContent" runat="server" ToolbarSet="SimpleBar" Width="100%"
                Height="400px" BasePath="~/fckeditor/">
            </FCKeditorV2:FCKeditor>
        </td>
    </tr>
    <tr>
        <td>
        </td>
        <td>
            <asp:Button ID="btnUpdate" runat="server" Text="Cập nhật" OnClick="btnUpdate_Click" />
             <asp:Button ID="btnBack" runat="server" Text="Trở về" 
                onclick="btnBack_Click"  />
        </td>
    </tr>
</table>
